<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var num1 = 100.01
        var num2 = '100.01abc'
        var num3 = 'abc100.01'
        console.log(parseFloat(num1))
        console.log(parseInt(num1))
        console.log(parseFloat(num2))
        console.log(parseInt(num2))
        console.log(parseFloat(num3))
        console.log(parseInt(num3))


        var num4 = 100.31
        console.log(typeof num4.toString())


        var str1 = 'aoziyi'
        console.log(str1.length)

        var str2 = 'yuelaiyuehaoya3ye'
        console.log(str1.concat(str2))
        console.log(str1 + str2)

        var str3 = 'longgongtaiziaoziyi'
        console.log(str3.indexOf('a'))
        console.log(str3.lastIndexOf('o'))

        var str4 = 'xinqing7xiang'
        str4 = str4.replace('7', 'qi')
        console.log(str4)

        var str5 = 'WUlunQingkonghaishiWUyun'
        console.log(str5.toUpperCase())
        console.log(str5.toLowerCase())

        var str6 = 's c f y s n q'
        var str7 = 'qt=azy&lyg=ceq'
        console.log(str6.split(''))
        console.log(str7.split('&'))

        var str8 = 'wodouyinweini'
        console.log(str8.slice(5, 11))

        var num5 = 31
        console.log(Math)
        console.log(Math.abs(-31))
        console.log(Math.ceil(31.000001))
        console.log(Math.floor(31.999999))
        console.log(Math.max(13, 15, 17, 19, 21))
        console.log(Math.min(11, 21, 31, 41, 51, 41))
        console.log(Math.pow(2, 8))
        console.log(Math.pow(18, 6))
        console.log(Math.sqrt(9, 3))
        console.log(Math.random())
        console.log(Math.random() * 20)
        console.log(Math.random() * 20 + 5)
 

        var arr1 = [1, 2, 3, 4, 5]
        console.log(arr1.pop())
        console.log(arr1)
        console.log(arr1.push(100))
        console.log(arr1)
        console.log(arr1.shift())
        console.log(arr1)
        console.log(arr1.unshift(200))
        console.log(arr1)
        console.log(arr1.length)

        var arr2 = [1, 2, 3, 4, 5, 6, 7]
        console.log(arr2.splice(7, 8, 10, 20, 30, 40, 50, 60))
        console.log(arr2)
        var arr3 = [1, 2, 3, 4, 5, 6, 7]
        arr3.splice(5, 0, 100)
        console.log(arr3)
        arr3.splice(5, 1)
        console.log(arr3)

        var arr4 = [1, 2, 3, 4, 5]
        console.log(arr4.reverse())
        console.log(arr4)

        var arr5 = [47, 53, 2, 20, 57, 13, 46, 215, 29, 56, 83]
        arr5.sort(function (a, b) {
            return b - a
        })
        console.log(arr5)
        var arr6 = [1, 2, 3, 4, 5]
        arr6.fill(200, 20, 40)
        console.log(arr6)

        var arr7 = [1, 2, 3, 4, 5, 6, 7]
        console.log(arr7.slice(3, 5))
        console.log(arr7)

        var str10 = 'a b c d e f g'
        var arr10 = str10.split(' ')
        console.log(arr10.join('-'))

        function demo(a, o, z, i, y, i) {
            console.log(a, o, z, i, y, i)
        }
        demo(100, 200, 300, 400, 500, 600)

    </script>
</body>

</html>